import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork" 
// 鞋面缴库部门定义
export interface VampToTheWarehouseDepartmentInterface{
    companyId: string,
    factoryDept: string,
    collectDept: string,
    collectName: string,
    vendorFlag: null,
    abbrName: null,
    groupDept: string,
    vendorNo: null,
    vendorNo2: null,
    stkName: null,
    seqNo: null,
    persons: null
}

export const VampToTheWarehouseDepartment = () => {
    return service.get<any,VampToTheWarehouseDepartmentInterface[]>(`/pcFactorStockQuery/getStcColHeadQuery`)
}

// 分厂组别定义查询
export const BranchGroupDefinition = (collectDept:string) => {
    return service.get<any,any>(`/pcFactorStockQuery/getStcColDetailQuery?collectDept=${collectDept}`)
}

// 删除鞋面缴库部门定义
export const DeleteTheTreasuryDepartment = (collectDept:string) => {
    return LoginWork.post<any,any>(`/pcFactorStockQuery/stcColHeadDelete?collectDept=${collectDept}`)
}

// 分厂组别定义删除
export const BranchGroupDefinitionDeleted = (collectDept:string,deptNo:string) => {
    return LoginWork.post<any,any>(`/pcFactorStockQuery/stcColDetailDelete?collectDept=${collectDept}&deptNo=${deptNo}`)
}

// 鞋面缴库新增
export interface VampDepositAddedParms{
    collectDept:string,
    collectDeptNew:string,
    collectName:string,
    factoryDept:string,
    groupDept:string
    persons:string,
    vendorFlag:string
}

export const VampDepositAdded = (parms:VampDepositAddedParms) => {
    return LoginWork.put<any,any>('/pcFactorStockQuery/stcColHeadAdd',parms)
}

// 分类组别定义新增
export interface CategoryGroupDefinitionAddedParms {
    collectDept:string,
    deptName:string,
    deptNo:string,
    deptNoNew:string,
    factoryDept:string
}

export const CategoryGroupDefinitionAdded = (parms:CategoryGroupDefinitionAddedParms) => {
    return LoginWork.put<any,any>('/pcFactorStockQuery/stcColDetailAdd',parms)
}

// 部门定义 修改
export interface DepartmentDefinitionModificationParms{
    collectDept:string,
    collectDeptNew:string,
    collectName:string,
    factoryDept:string,
    groupDept:string,
    persons:string,
    vendorFlag:string
}

export const DepartmentDefinitionModification = (parms:DepartmentDefinitionModificationParms) => {
    return LoginWork.put<any,any>('/pcFactorStockQuery/stcColHeadUpdate',parms)
}